POV-Ray : Newsgroups : povray.programming : [patch] Suggesting trivial patch (again) : [patch] Suggesting trivial patch (again) Server Time
8 Jul 2024 18:58:54 EDT (-0400)
  [patch] Suggesting trivial patch (again)  
From: Wolfgang Wieser
Date: 9 Feb 2003 16:08:51
Message: <3e46c362@news.povray.org>
Sorry for re-posting this on the newsgroup but I did not get 
any response to it. 

What about applying this trivial patch? 
I think there is no need to continue the for() loop once 
we set found=true. 

/* NK phmap */
/* this function checks if 'object' is equal to 'parent' or is a child
 * of 'parent'
 */
static int IsObjectInCSG(OBJECT *Object, OBJECT *parent)
{
  OBJECT *Sib;
  int found;

  if (Object == parent) return true;

  found = false;
  if(parent->Type & IS_COMPOUND_OBJECT)
  {
    for (Sib = ((CSG *)parent)->Children; Sib != NULL; Sib = Sib->Sibling)
    {
      if(IsObjectInCSG(Object, Sib))
-        found = true;
+        {  found = true;  break;  }
    }
  }
  return found;
}

BTW, I would appreciate if you could establish ordinary version 
numbers like everybody else does. I mean, the file povuni_s.tgz 
on the FTP should be a symlink to povuni_s-3.5c.tgz or whatever. 

Making available incremental paches would be helpful, too because 
that makes it easier to keep a modified version around (though this 
is not necessary because I can make the patch myself). 

Wolfgang


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.